The present invention relates to a processor and a data gathering method, and for example, relates to a processor, a data processing device, a data gathering method, and a data writing method for reading or writing a plurality of data sets stored in a memory.
In recent years, processors capable of executing vector operations have been developed. A vector operation performs a plurality of scalar operations as one operation on vector data elements. Published Japanese Translation of PCT International Publication for Patent Application, No. 2014-504418 discloses a gather instruction and a scatter instruction executed before and after a vector operation is performed.
A gather instruction is an instruction for gathering data values corresponding to a plurality of designated indices of a data array from corresponding areas of a memory. The plurality of data values gathered by the gather instruction is used as an input vector of a subsequent vector operation. A scatter instruction is an instruction for storing data values of vector data in areas of a memory corresponding to designated indices of a data array. The respective elements of the output vector generated by a vector operation can be used as the vector data that is subject to the scatter instruction.